var item_dir = {
	init : function(dataUrl){
		this.html = "";
		this.lv = 0;
		this.idx = 1;
		F.get(dataUrl).call2json(function(json){
			this.setCol(json);
			var box = F().append("div").ps().pos(10,2).html(this.html);
			var n = box.tags("a").len - 2;
			box.child().each(function(idx,fo){
				idx<8 && fo.child(0).append("b").html(" ("+fo.tags("a").len+"/"+n+")");
			});
		}.proxy(this));
	},
	//栏目HTML
	setCol : function(a){
		a.each(function(o,i){
			this.html += '<div class="col$idx">'.mix(this);
			this.setHTML(o,"0,"+i);
			this.html += '</div>';
			this.idx++;
		}.proxy(this));
	},
	//itemHTML
	setHTML : function(o,ii){
		if(o.items && o.items.length>0){
			this.lv++;
			this.html += '<h$lv title="$cat_name">$cat_title</h$lv><ul>'.mix(this).mix(o);
			var oo;
			for(var i=0,l=o.items.length; i<l; i++){
				oo = o.items[i];
				this.html += '<li>';
				if(oo.name){
					this.html += ('<a href="$url" title="$title" onclick="top.item.tree.open(top.item.tree.root,['+ii+'])">$name</a>').mix(oo);
				}
				this.setHTML(oo,ii+","+i);
				this.html += '</li>';
			}
			this.html += '</ul>';
			this.lv--;
		}
	}
};